package com.eduran.test.model.logger;


import com.eduran.test.model.ConsoleWriter;
import com.eduran.test.model.FileWriter;
import org.springframework.beans.factory.annotation.Autowired;

public class Logger_025 {
    @Autowired
    private ConsoleWriter consoleWriter;
    @Autowired
    private FileWriter fileWriter;

    /*
    @Autowired
    public Logger_024(ConsoleWriter consoleWriter, FileWriter fileWriter) {
        this.consoleWriter = consoleWriter;
        this.fileWriter = fileWriter;
    }
    */
    //@Autowired
    public void setConsoleWriter(ConsoleWriter consoleWriter) {
        this.consoleWriter = consoleWriter;
    }
    //@Autowired
    public void setFileWriter(FileWriter fileWriter) {
        this.fileWriter = fileWriter;
    }

    public void writeFile(String text){
        fileWriter.write(text);
    }

    public void writeConsole(String text){
        consoleWriter.write(text);
    }
}
